	<div class="column half fl">
		
		<div class="box themed_box">
		<h2 class="box-header"><?php echo $title; ?></h2>

		<div class="box-content">
        <?php echo $this->session->flashdata('message'); ?>
		
   
        <!--<form id="formtest" name="formtest" method="post" action="<?php echo site_url($form['action']); ?>">-->
            	
                <span class="grid width20 fl"><label class="form-label"><?php echo $this->lang->line('status'); ?></label></span>
				<span class="grid width77 fr"><h4><?php if($table['value']<>"") { echo $table['value']['status_name']; } else { echo '-'; } ?> | <?php if($table['value']<>"") { echo $table['value']['customer_from']; } else { echo '-'; } ?> | <?php if($table['value']<>"") { echo $table['value']['rev2']; } else { echo '-'; } ?></h4></span>
                <div class="clear"></div>
                
                <br/> 
                
                <span class="grid width20 fl"><label class="form-label required"><?php echo $this->lang->line('pt_name'); ?></label></span>
				<span class="grid width77 fr"><?php if($table['value']<>"") { echo $table['value']['customer_name']; } ?></span>
				<div class="clear"></div>
                
                <?php if($title<>$this->lang->line('viewprospect')): ?>
                
                
                <span class="grid width20 fl"><label class="form-label"><?php echo $this->lang->line('sector'); ?></label></span>
				<span class="grid width77 fr"><?php if($table['value']<>"") { echo $table['value']['sector_name']; } else { echo '-'; } ?></span>
				<div class="clear"></div>
                
                <span class="grid width20 fl"><label class="form-label"><?php echo $this->lang->line('group'); ?></label></span>
				<span class="grid width77 fr"><?php if($table['value']<>"") { echo $table['value']['group_name']; } else { echo '-'; } ?></span>
				<div class="clear"></div>
                
                <span class="grid width20 fl"><label class="form-label"><?php echo $this->lang->line('source'); ?></label></span>
				<span class="grid width77 fr"><?php if($table['value']<>"") { echo $table['value']['source_name']; } else { echo '-'; } ?></span>
				<div class="clear"></div>
                
                
                <?php endif;?>
                
				<span class="grid width20 fl"><label class="form-label"><?php echo $this->lang->line('tlp'); ?></label></span>
				<span class="grid width77 fr"><?php if($table['value']<>"") { echo $table['value']['tlp']; } else { echo '-'; } ?></span>
				<div class="clear"></div>
                
                <span class="grid width20 fl"><label class="form-label"><?php echo $this->lang->line('pic'); ?></label></span>
				<span class="grid width77 fr"><?php if($table['value']<>"") { echo $table['value']['fn_pic'].' '.$table['value']['pic']; } else { echo '-'; } ?></span>
				<div class="clear"></div>
                
                <span class="grid width20 fl"><label class="form-label"><?php echo $this->lang->line('pos'); ?></label></span>
				<span class="grid width77 fr"><?php if($table['value']<>"") { echo $table['value']['pic_pos']; } else { echo '-'; } ?></span>
				<div class="clear"></div>
				
				<span class="grid width20 fl"><label class="form-label"><?php echo $this->lang->line('email'); ?></label></span>
				<span class="grid width77 fr"><?php if($table['value']<>"") { echo $table['value']['email']; } else { echo '-'; } ?></span>
				<div class="clear"></div>
				
				<span class="grid width20 fl"><label class="form-label"><?php echo $this->lang->line('ext'); ?></label></span>
				<span class="grid width77 fr"><?php if($table['value']<>"") { echo $table['value']['ext']; } else { echo '-'; } ?></span>
				<div class="clear"></div>
				
				<span class="grid width20 fl"><label class="form-label"><?php echo $this->lang->line('hp'); ?></label></span>
				<span class="grid width77 fr"><?php if($table['value']<>"") { echo $table['value']['hp']; } else { echo '-'; } ?></span>
				<div class="clear"></div>
				
	
                <span class="grid width20 fl"><label class="form-label"><?php echo $this->lang->line('pic').'2'; ?></label></span>
				<span class="grid width77 fr"><?php if($table['value']<>"") { echo $table['value']['fn_pic2'].' '.$table['value']['pic2']; } else { echo '-'; } ?></span>
				<div class="clear"></div>
                
                <span class="grid width20 fl"><label class="form-label"><?php echo $this->lang->line('pos'); ?></label></span>
				<span class="grid width77 fr"><?php if($table['value']<>"") { echo $table['value']['pic2_pos']; } else { echo '-'; } ?></span>
				<div class="clear"></div>
				
				<span class="grid width20 fl"><label class="form-label"><?php echo $this->lang->line('email'); ?></label></span>
				<span class="grid width77 fr"><?php if($table['value']<>"") { echo $table['value']['email2']; } else { echo '-'; } ?></span>
				<div class="clear"></div>
				
				<span class="grid width20 fl"><label class="form-label"><?php echo $this->lang->line('ext'); ?></label></span>
				<span class="grid width77 fr"><?php if($table['value']<>"") { echo $table['value']['ext2']; } else { echo '-'; } ?></span>
				<div class="clear"></div>
        
                <span class="grid width20 fl"><label class="form-label"><?php echo $this->lang->line('hp'); ?></label></span>
				<span class="grid width77 fr"><?php if($table['value']<>"") { echo $table['value']['hp2']; } else { echo '-'; } ?></span>
				<div class="clear"></div>
                
                <span class="grid width20 fl"><label class="form-label"><?php echo $this->lang->line('fax'); ?></label></span>
				<span class="grid width77 fr"><?php if($table['value']<>"") { echo $table['value']['fax']; } else { echo '-'; } ?></span>
				<div class="clear"></div>
                
                <span class="grid width20 fl"><label class="form-label"><?php echo $this->lang->line('address'); ?></label></span>
				<span class="grid width77 fr"><?php if($table['value']<>"") { echo $table['value']['address']; } else { echo '-'; } ?></span>
				<div class="clear"></div>
                
                <span class="grid width20 fl"><label class="form-label"><?php echo $this->lang->line('city'); ?></label></span>
				<span class="grid width77 fr"><?php if($table['value']<>"") { echo $table['value']['city']; } else { echo '-'; } ?></span>
				<div class="clear"></div>
                
                <span class="grid width20 fl"><label class="form-label"><?php echo $this->lang->line('zipcode'); ?></label></span>
				<span class="grid width77 fr"><?php if($table['value']<>"") { echo $table['value']['zip_code']; } else { echo '-'; } ?></span>
				<div class="clear"></div>
               
                
				<div class="clear"></div>
		
		</div>

		</div>

		<div class="box themed_box">
		<h2 class="box-header"><?php echo 'User'; ?></h2>

		<div class="box-content">
        <?php echo $this->session->flashdata('message'); ?>

                <span class="grid width20 fl"><label class="form-label"><?php echo $this->lang->line('ta'); ?></label></span>
				<span class="grid width77 fr"><?php if($table['value']<>0) { echo $table['value']['rev']; } else { echo '-'; } ?></span>
                <div class="clear"></div>
                
                <span class="grid width20 fl"><label class="form-label required"><?php echo $this->lang->line('se'); ?></label></span>
				<span class="grid width77 fr"><?php if($table['value']<>0) { echo $table['value']['rev2']; } ?></span>
				<div class="clear"></div>
     
				<span class="grid width20 fl"><label class="form-label"><?php echo $this->lang->line('ae'); ?></label></span>
				<span class="grid width77 fr"><?php if($table['value']<>0) { echo $table['value']['rev3']; } else { echo '-'; } ?></span>
				<div class="clear"></div>
     
				
		
		</div>

		</div>	
			
	</div>
	
	
		<div class="column half fr">
        
		<div class="box themed_box">
		<h2 class="box-header-new"></h2>
		<h2 class="box-header"><?php echo $this->lang->line('job'); ?></h2>
			
			<div class="box-content box-table">
			
            
			<table class="tablebox">
				<thead class="table-header">
					<tr>
						<th><?php echo $this->lang->line('no'); ?></th>
                        <th><?php echo $this->lang->line('date');?></th>
                        <th><?php echo 'Product'; ?></th>
						<th><?php echo 'Value'; ?></th>
                        <th><?php echo $this->lang->line('batch'); ?></th>
                        <th><?php echo $this->lang->line('pic'); ?></th>
						<th><?php echo $this->lang->line('trr'); ?></th>
					</tr>
				</thead>
				
				<tbody class="openable-tbody">
                    <?php 
					$i=1; 
					$total=0;
					?>
					<?php foreach($table['jobs'] as $rec): ?>
                    <?php if($i % 2 == 0): 
                            $zebra="odd";
                          else: 
                            $zebra="even";
                          endif;
                    ?>
                    <tr class="<?php echo $zebra;?>">
						<td>
							<h5><?=anchor('jobs/crm/view/'.$rec['id'],$rec['no']); ?></h5>
		
						</td>
                        <td>

							<h5><?php echo $rec['date_posting']; ?></h5>
						</td>
                        
                        
                        <td>
						<h5><?php echo $rec['product_name']; ?></h5>
                        
						</td>
						
						<td>
						<h5>
						<?php
						$total = $total + $rec['total'];	
						echo number_format($rec['total'],0); ?></h5>
                        
						</td>
						
						<td>
						<h5><?php echo $rec['jo_batch']; ?></h5>
                        
						</td>
						
                        <td>
							<h5><?php echo $rec['pic']; ?></h5>
		
						</td>
						
						<td>
						<h5><?=anchor('crm-assets/jo/'.$rec['trr'],$this->lang->line('trr'))?></h5>
                        
						</td>
                        
                        
					</tr>
     
                    <?php $i++; endforeach;?>
                    
				</tbody>
				
				<tfoot class="table-header">
					<tr>
						<th></th>
                        <th></th>
                        <th><?php echo '<h5>Total</h5>'; ?></th>
                        <th><h5><?php echo number_format($total,0); ?></h5></th>
                        <th></th>
						<th></th>
						<th></th>
					</tr>
				</tfoot>
				
			</table>
            <!--
				<ul class="pagination">
				<li><a class="button white" href="#">previous</a></li>

				<li><a class="button white" href="#">1</a></li>
				<li><a class="button white" href="#">2</a></li>
				<li><a class="button white active" href="#">3</a></li>
				<li><a class="button white" href="#">4</a></li>
				<li><a class="button white" href="#">5</a></li>
				<li><a class="button white" href="#">6</a></li>

				<li><a class="button white" href="#">next</a></li>
				</ul>
              -->  
			</div>
		</div>
		
		
		<div class="box themed_box">
		<h2 class="box-header-new"></h2>
		<h2 class="box-header"><?php echo 'Note'; ?></h2>
			
			<div class="box-content box-table">
			
            
			<table class="tablebox">
				<thead class="table-header">
					<tr>
						<th><?php echo 'Note'; ?></th>
                        
					</tr>
				</thead>
				
				<tbody class="openable-tbody">
                    <?php 
					$i=1; 
					$total=0;
					?>
					<?php /*foreach($table['jobs'] as $rec): ?>
                    <?php if($i % 2 == 0): 
                            $zebra="odd";
                          else: 
                            $zebra="even";
                          endif;*/
                    ?>
                    <tr class="odd<?php //echo $zebra;?>">
						<td>
							<h5><?php echo $table['value']['desc'];  // echo $rec['information']; ?></h5>
		
						</td>
            
					</tr>
     
                    <?php //$i++; endforeach;?>
                    
				</tbody>
				
				
				
			</table>
            <!--
				<ul class="pagination">
				<li><a class="button white" href="#">previous</a></li>

				<li><a class="button white" href="#">1</a></li>
				<li><a class="button white" href="#">2</a></li>
				<li><a class="button white active" href="#">3</a></li>
				<li><a class="button white" href="#">4</a></li>
				<li><a class="button white" href="#">5</a></li>
				<li><a class="button white" href="#">6</a></li>

				<li><a class="button white" href="#">next</a></li>
				</ul>
              -->  
			</div>
		</div>
        
	
</div>		

	<?php if($title<>$this->lang->line('viewprospect')): ?>
	<div class="column full fr">
		<div class="box themed_box">
		<h2 class="box-header-new"></h2>
		<h2 class="box-header"><?php echo 'Status Update'; ?></h2>
			
			<div class="box-content box-table">
			
            
			<table class="tablebox">
				<thead class="table-header">
					<tr>
						<th><?php echo $this->lang->line('date'); ?></th>
						<th><?php echo $this->lang->line('time'); ?></th>
						<th><?php echo $this->lang->line('activity'); ?></th>
                        <th><?php echo $this->lang->line('location'); ?></th>
						<th><?php echo $this->lang->line('user'); ?></th>
                        <th><?php echo $this->lang->line('participant'); ?></th>
                        <th><?php echo $this->lang->line('objective'); ?></th>
                        <th><?php echo $this->lang->line('result'); ?></th>
                        <th><?php echo $this->lang->line('follow_up'); ?></th>
                        
						
					</tr>
				</thead>
				
				<tbody class="openable-tbody">
                    <?php $i=1; ?>
					<?php foreach($table['activity'] as $rec): ?>
                    <?php if($i % 2 == 0): 
                            $zebra="odd";
                          else: 
                            $zebra="even";
                          endif;
                    ?>
                    <tr class="<?php echo $zebra;?>">
						<td>
							<h5><?php echo $rec['activity_date']; ?></h5>
		
						</td>
						<td>
							<h5><?php echo $rec['activity_time']; ?></h5>
		
						</td>
						<td>

							<h5><?php echo $rec['activity_type']; ?></h5>
						</td>
                        
                        <td>
						<h5><?php echo $rec['activity_location']; ?></h5>
                        
						</td>
						
						<td>
						<h5><?php echo $rec['pic']; ?></h5>
                        
						</td>
                        
                        <td>
						<h5><?php echo $rec['activity_people']; ?></h5>
                        
						</td>
                        
                        <td>
						<h5><?php echo $rec['activity_objective']; ?></h5>
                        
						</td>
                        
                        <td>
						<h5><?php echo $rec['activity_result']; ?></h5>
                        
						</td>
                        
                        <td>
						<h5><?php echo $rec['activity_follow_up']; ?></h5>
                        
						</td>
                        
                        
                        
						
					</tr>
     
                    <?php $i++; endforeach;?>
                    
				</tbody>
				
				
				
			</table>
            <!--
				<ul class="pagination">
				<li><a class="button white" href="#">previous</a></li>

				<li><a class="button white" href="#">1</a></li>
				<li><a class="button white" href="#">2</a></li>
				<li><a class="button white active" href="#">3</a></li>
				<li><a class="button white" href="#">4</a></li>
				<li><a class="button white" href="#">5</a></li>
				<li><a class="button white" href="#">6</a></li>

				<li><a class="button white" href="#">next</a></li>
				</ul>
              -->  
			</div>
		</div>
        
		
        
        
        			
	</div>
    <?php endif;?>
    
<script type="text/javascript">
    function changeBgr(isi) {
    document.formtest.rev.value = isi;
    document.getElementById('box-con').style.display = 'none';
    } 
</script>  